package com.example.Laboratory.Mapper;

import com.example.Laboratory.Entity.Achievements_project;
import org.apache.ibatis.annotations.*;


import java.util.List;

@Mapper
public interface Achievements_projectMapper {

    //增加科研成果-项目信息
    @Insert("INSERT INTO achievements_project(achievements_project_name,achievements_project_type,achievements_project_person,achievements_project_year)VALUES(#{achievements_project_name},#{achievements_project_type},#{achievements_project_person},#{achievements_project_year})")
    int addAchievements_project (Achievements_project p);

    //根据id删除信息
    @Delete("DELETE FROM achievements_project WHERE achievements_project_id=#{achievements_project_id}")
    int deleteAchievements_project (int achievements_project_id);

    //查找全表信息
    @Select("SELECT * FROM achievements_project")
    List<Achievements_project> researchAchievements_project ( );


    //修改全部信息
    @Update("UPDATE achievements_project SET achievements_project_name=#{achievements_project_name},achievements_project_type=#{achievements_project_type},achievements_project_person=#{achievements_project_person},achievements_project_year=#{achievements_project_year} WHERE achievements_project_id=#{achievements_project_id}")
    int reviseAchievements_project (Achievements_project p);
}
